﻿<%@ Page Language="C#" MasterPageFile="~/SiteLayout.Master" AutoEventWireup="true" CodeBehind="TreeShop.aspx.cs" Inherits="ForestryEnterprise.TreeShop" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        #subinvs td.headers
        {
            background-color:Gray;
            color:White;
        }
        
        #subinvs td.alternative
        {
            background-color:#EEE;
        }
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="context" runat="server">
    <h2 style="margin:0px; padding:0px; text-align:center;">Buy Trees</h2>
    
    <asp:DropDownList ID="trees" runat="server" 
        onselectedindexchanged="trees_SelectedIndexChanged" AutoPostBack="true" />
    <label>M3 Price:</label>
    <asp:Label ID="m3Price" runat="server" />
    <label>Prm Price:</label>
    <asp:Label ID="prmPrice" runat="server" />
    <hr />
    <label>Amount:</label><asp:TextBox ID="treeAmount" runat="server" />
    <label>Type:</label><asp:DropDownList id="buyType" runat="server" />
    <asp:Button ID="addTree" Text="Add" runat="server" onclick="addTree_Click" />
    <asp:RegularExpressionValidator ID="regAmount" ControlToValidate="treeAmount" ValidationExpression="[0-9]*\.?[0-9]*" ErrorMessage="Number (float xx.yy)" runat="server" />
    <hr />
    <table id="subinvs" runat="server" style="border-collapse:collapse; width:100%;">
        <tr>
            <td class="headers">
                Tree
            </td>
            <td class="headers">
                Amount
            </td>
            <td class="headers">
                Cost per unit
            </td>
            <td class="headers">
                Subtotal
            </td>
        </tr>
    </table>
    <div style="float:right; font-weight:bold; text-decoration:underline; padding:10px;">
        <label>Total:</label><asp:Label id="totalCost" runat="server">0.0</asp:Label>
    </div>
    <hr />
    <div>
        <asp:Button ID="buy" Text="Buy" runat="server" onclick="buy_Click" />
        <asp:Button ID="cancel" Text="Cancel" runat="server" onclick="cancel_Click" />
    </div>
</asp:Content>

        
